--------------------------------------------------------------------------------
      name:  <unnamed>
       log:  R:\Current Research\Markets-Pridemore\Work\MAR03-MedModel.log
  log type:  text
 opened on:  25 Jun 2024, 15:22:18

. 
. //  program:    Stata 
. //  task:       Sample and diagnostics 
. //  project:    Markets  
. 
. version
version 17.0

. clear all

. macro drop _all

. set linesize 80

. set more off

. local tag " 07-05-23| Cleaned 06-06-24"

. local file "MAR03-MedModel"

. local note "|`tag' | `file'"

. local opt "noparen sideway excel noaster  bdec(2)  sdec(2)  pdec(3)   adec(2) 
> e(r2) stats(coef se pval)"

. local dv "lrhom"

. local iv "fraser"

. local iv2 "infantmort" 

. local cont " edu unemp  popdense perurban  sexratio"

. local cont2 " gini edu unemp  popdense perurban  sexratio"

. local icid " i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i1
> 9 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 
> i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i5
> 8 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 
> i78 i79 i80 i81 i82 i83 i84 i85  i87 i88"

. local iyear " x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x
> 19 "

. 
. //      #0
. //      Loading data 
. use MAR02-SampDiag.dta, clear 

. 
. //      #1
. //      Xtset up 
. xtset CID year 

Panel variable: CID (unbalanced)
 Time variable: year, 2000 to 2019, but with gaps
         Delta: 1 unit

. 
. //      #2
. //      mediation model set up (nation fixed effects)
. tab CID, gen(i)

        CID |      Freq.     Percent        Cum.
------------+-----------------------------------
          8 |          8        0.52        0.52
         32 |         20        1.31        1.84
         36 |         19        1.25        3.08
         40 |         20        1.31        4.40
         44 |         16        1.05        5.45
         48 |          7        0.46        5.91
         51 |         14        0.92        6.82
         52 |         13        0.85        7.68
         56 |         19        1.25        8.92
         76 |         20        1.31       10.24
         84 |         17        1.12       11.35
         96 |          7        0.46       11.81
        100 |         20        1.31       13.12
        124 |         20        1.31       14.44
        144 |         14        0.92       15.35
        152 |         20        1.31       16.67
        170 |         20        1.31       17.98
        188 |         20        1.31       19.29
        191 |         19        1.25       20.54
        196 |         17        1.12       21.65
        203 |         20        1.31       22.97
        208 |         20        1.31       24.28
        214 |         19        1.25       25.52
        218 |         20        1.31       26.84
        222 |         19        1.25       28.08
        233 |         20        1.31       29.40
        242 |         11        0.72       30.12
        246 |         20        1.31       31.43
        250 |         18        1.18       32.61
        268 |         16        1.05       33.66
        276 |         20        1.31       34.97
        300 |         20        1.31       36.29
        320 |         20        1.31       37.60
        328 |         19        1.25       38.85
        348 |         20        1.31       40.16
        352 |         18        1.18       41.34
        372 |         17        1.12       42.45
        376 |         20        1.31       43.77
        380 |         20        1.31       45.08
        388 |         13        0.85       45.93
        392 |         20        1.31       47.24
        398 |         15        0.98       48.23
        400 |          9        0.59       48.82
        410 |         20        1.31       50.13
        414 |         20        1.31       51.44
        417 |         15        0.98       52.43
        428 |         20        1.31       53.74
        440 |         20        1.31       55.05
        442 |         20        1.31       56.36
        458 |         20        1.31       57.68
        470 |         16        1.05       58.73
        480 |         20        1.31       60.04
        484 |         20        1.31       61.35
        498 |         14        0.92       62.27
        499 |          6        0.39       62.66
        512 |          6        0.39       63.06
        528 |         20        1.31       64.37
        554 |         17        1.12       65.49
        558 |         15        0.98       66.47
        578 |         17        1.12       67.59
        591 |         20        1.31       68.90
        600 |         20        1.31       70.21
        604 |         20        1.31       71.52
        608 |         15        0.98       72.51
        616 |         20        1.31       73.82
        620 |         17        1.12       74.93
        634 |          9        0.59       75.52
        642 |         20        1.31       76.84
        643 |         20        1.31       78.15
        688 |         15        0.98       79.13
        702 |         20        1.31       80.45
        703 |         16        1.05       81.50
        705 |         20        1.31       82.81
        710 |         19        1.25       84.06
        724 |         20        1.31       85.37
        752 |         19        1.25       86.61
        756 |         20        1.31       87.93
        760 |         11        0.72       88.65
        764 |         19        1.25       89.90
        780 |         13        0.85       90.75
        792 |         11        0.72       91.47
        804 |         18        1.18       92.65
        807 |         16        1.05       93.70
        818 |         20        1.31       95.01
        826 |         20        1.31       96.33
        840 |         20        1.31       97.64
        858 |         19        1.25       98.88
        862 |         17        1.12      100.00
------------+-----------------------------------
      Total |      1,524      100.00

. 
. //      #3
. //      mediator model set up (time fixed effects) 
. tab year, gen(x) 

       Year |      Freq.     Percent        Cum.
------------+-----------------------------------
       2000 |         73        4.79        4.79
       2001 |         72        4.72        9.51
       2002 |         73        4.79       14.30
       2003 |         71        4.66       18.96
       2004 |         73        4.79       23.75
       2005 |         78        5.12       28.87
       2006 |         77        5.05       33.92
       2007 |         80        5.25       39.17
       2008 |         80        5.25       44.42
       2009 |         84        5.51       49.93
       2010 |         84        5.51       55.45
       2011 |         81        5.31       60.76
       2012 |         82        5.38       66.14
       2013 |         78        5.12       71.26
       2014 |         80        5.25       76.51
       2015 |         76        4.99       81.50
       2016 |         76        4.99       86.48
       2017 |         74        4.86       91.34
       2018 |         69        4.53       95.87
       2019 |         63        4.13      100.00
------------+-----------------------------------
      Total |      1,524      100.00

. 
. //      #4
. //      Mediation Model `iv' through infant mort to `dv' nation fixed effects
. sem ( `iv'-> `iv2', ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv'
> )  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: infantmort lrhom

Exogenous variables
  Observed: fraser edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7
            i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24
            i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40
            i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56
            i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72
            i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:   log pseudolikelihood =  92663.918  
Iteration 1:   log pseudolikelihood =  92663.918  

Structural equation model                                Number of obs = 1,524
Estimation method: ml

Log pseudolikelihood = 92663.918

                                    (Std. err. adjusted for 88 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
       fraser |   -5.04121   .9143554    -5.51   0.000    -6.833314   -3.249106
        _cons |   47.32838   7.007703     6.75   0.000     33.59354    61.06323
  ------------+----------------------------------------------------------------
  lrhom       |
   infantmort |   .0044805   .0135553     0.33   0.741    -.0220874    .0310483
       fraser |  -.2445491   .0868006    -2.82   0.005    -.4146753    -.074423
          edu |   -2.72643   .8117702    -3.36   0.001    -4.317471    -1.13539
        unemp |   .0035128   .0080455     0.44   0.662     -.012256    .0192817
     popdense |  -.0003394   .0001026    -3.31   0.001    -.0005404   -.0001384
     perurban |   .0094687   .0227352     0.42   0.677    -.0350914    .0540288
     sexratio |  -.0122216   .0070836    -1.73   0.084    -.0261053    .0016621
           i1 |  -1.045325    .709145    -1.47   0.140    -2.435223     .344574
           i2 |  -1.130044   .2881723    -3.92   0.000    -1.694851   -.5652364
           i3 |  -1.395195    .087864   -15.88   0.000    -1.567405   -1.222984
           i4 |  -2.337424   .5187444    -4.51   0.000    -3.354144   -1.320703
           i5 |   .5777208   .1629944     3.54   0.000     .2582577    .8971839
           i6 |  -2.615991   .4396732    -5.95   0.000    -3.477734   -1.754247
           i7 |  -2.088781   .3362744    -6.21   0.000    -2.747866   -1.429695
           i8 |   -.103645   1.041856    -0.10   0.921    -2.145646    1.938356
           i9 |  -1.692117   .3636858    -4.65   0.000    -2.404928   -.9793056
          i10 |   .2660293   .2653989     1.00   0.316     -.254143    .7862015
          i11 |   .6118322     .75118     0.81   0.415    -.8604535    2.084118
          i12 |  -3.084946   .1937938   -15.92   0.000    -3.464775   -2.705117
          i13 |  -1.778581   .2018686    -8.81   0.000    -2.174236   -1.382925
          i14 |  -1.542819   .0398473   -38.72   0.000    -1.620919    -1.46472
          i15 |  -.9283623   1.393444    -0.67   0.505    -3.659462    1.802737
          i16 |  -.8436543   .2015415    -4.19   0.000    -1.238668   -.4486403
          i17 |   .6907925   .2057185     3.36   0.001     .2875916    1.093993
          i18 |  -.3281202   .2436278    -1.35   0.178    -.8056219    .1493816
          i19 |  -2.002986   .6138129    -3.26   0.001    -3.206037   -.7999345
          i20 |  -1.731619    .342898    -5.05   0.000    -2.403686   -1.059551
          i21 |   -2.04846   .2072661    -9.88   0.000    -2.454694   -1.642226
          i22 |  -2.077648   .1112984   -18.67   0.000    -2.295789   -1.859507
          i23 |  -.5786158   .2518213    -2.30   0.022    -1.072177   -.0850551
          i24 |  -.3306632   .4042694    -0.82   0.413    -1.123017    .4616903
          i25 |   1.098139    .296068     3.71   0.000     .5178567    1.678422
          i26 |  -.2394591   .2890992    -0.83   0.408    -.8060832     .327165
          i27 |  -2.100319   .6322243    -3.32   0.001    -3.339456   -.8611826
          i28 |  -1.268604   .0706405   -17.96   0.000    -1.407057   -1.130151
          i29 |  -2.656147   .1419577   -18.71   0.000    -2.934379   -2.377915
          i30 |  -1.808908   .5071887    -3.57   0.000     -2.80298   -.8148367
          i31 |  -2.309224   .1406221   -16.42   0.000    -2.584838    -2.03361
          i32 |  -2.197565    .205333   -10.70   0.000     -2.60001   -1.795119
          i33 |   .3250852   .5687966     0.57   0.568    -.7897356    1.439906
          i34 |   .0454986   1.079177     0.04   0.966    -2.069649    2.160646
          i35 |  -1.720421   .2963341    -5.81   0.000    -2.301225   -1.139617
          i36 |  -2.484083    .249361    -9.96   0.000    -2.972822   -1.995345
          i37 |  -1.841113   .4710368    -3.91   0.000    -2.764329   -.9178982
          i38 |  -1.192939    .247807    -4.81   0.000    -1.678631   -.7072457
          i39 |  -2.379283   .3055298    -7.79   0.000     -2.97811   -1.780455
          i40 |  -1.643038   .5443016    -3.02   0.003    -2.709849   -.5762259
          i41 |  -3.035627    .205088   -14.80   0.000    -3.437592   -2.633662
          i42 |  -.1398304   .5061659    -0.28   0.782    -1.131897    .8522365
          i43 |  -2.242089   .2927871    -7.66   0.000    -2.815941   -1.668237
          i44 |  -1.637052    .111296   -14.71   0.000    -1.855188   -1.418916
          i45 |  -2.510095    .558065    -4.50   0.000    -3.603882   -1.416308
          i46 |  -.8042216   .9248023    -0.87   0.385    -2.616801    1.008358
          i47 |   -.099882   .2862483    -0.35   0.727    -.6609183    .4611543
          i48 |  -.2881741   .3241604    -0.89   0.374    -.9235168    .3471686
          i49 |  -2.498085   .2119697   -11.79   0.000    -2.913538   -2.082632
          i50 |  -3.078573   .3130779    -9.83   0.000    -3.692194   -2.464952
          i51 |  -1.958562   .4153241    -4.72   0.000    -2.772583   -1.144542
          i52 |  -.8901462   .7951155    -1.12   0.263    -2.448544    .6682516
          i53 |  -.1152236   .1874105    -0.61   0.539    -.4825415    .2520943
          i54 |  -.5912832   .8094775    -0.73   0.465     -2.17783    .9952635
          i55 |  -1.761663   .4308476    -4.09   0.000    -2.606109   -.9172176
          i56 |  -4.409271    .580708    -7.59   0.000    -5.547438   -3.271105
          i57 |  -1.891163     .12895   -14.67   0.000      -2.1439   -1.638425
          i58 |  -1.377831   .1146165   -12.02   0.000    -1.602475   -1.153187
          i59 |  -.9060566    .443542    -2.04   0.041    -1.775383   -.0367303
          i60 |  -2.036392   .1237743   -16.45   0.000    -2.278985   -1.793798
          i61 |   .2083743   .2948479     0.71   0.480    -.3695169    .7862656
          i62 |  -.3788027   .4194767    -0.90   0.367    -1.200962    .4433565
          i63 |   -1.88563   .1457783   -12.93   0.000     -2.17135    -1.59991
          i64 |   .1990901   .6644192     0.30   0.764    -1.103148    1.501328
          i65 |  -1.991011   .4941373    -4.03   0.000    -2.959502    -1.02252
          i66 |  -2.189359    .466603    -4.69   0.000    -3.103884   -1.274834
          i67 |  -1.506146    1.51622    -0.99   0.321    -4.477881     1.46559
          i68 |  -1.386576   .5797013    -2.39   0.017    -2.522769   -.2503818
          i69 |  -.0203849   .2447433    -0.08   0.934     -.500073    .4593033
          i70 |  -1.761636   .6208998    -2.84   0.005    -2.978577   -.5446943
          i71 |  -.6208204   1.012045    -0.61   0.540    -2.604391    1.362751
          i72 |  -1.902992   .5960711    -3.19   0.001     -3.07127    -.734714
          i73 |  -1.944202   .7001017    -2.78   0.005    -3.316376   -.5720279
          i74 |  -.4566538   .4059579    -1.12   0.261    -1.252317     .339009
          i75 |  -2.402966   .1580711   -15.20   0.000    -2.712779   -2.093152
          i76 |  -1.966596   .0904998   -21.73   0.000    -2.143973    -1.78922
          i77 |  -2.158439   .1616329   -13.35   0.000    -2.475234   -1.841644
          i78 |  -3.191131   .6225071    -5.13   0.000    -4.411223   -1.971039
          i79 |  -1.108172   .8190238    -1.35   0.176    -2.713429    .4970853
          i80 |   .8847068   .4907662     1.80   0.071    -.0771773    1.846591
          i81 |   -2.28424   .2058674   -11.10   0.000    -2.687733   -1.880748
          i82 |  -.7451993   .3581336    -2.08   0.037    -1.447128   -.0432703
          i83 |  -1.947157   .5585714    -3.49   0.000    -3.041937   -.8523775
          i84 |  -4.967699   .7739919    -6.42   0.000    -6.484696   -3.450703
          i85 |  -2.731687   .0383965   -71.14   0.000    -2.806942   -2.656431
          i87 |  -.8858283   .3748665    -2.36   0.018    -1.620553   -.1511035
          i88 |  -.0631642   .3762448    -0.17   0.867    -.8005904     .674262
        _cons |    6.59381   2.020235     3.26   0.001     2.634222     10.5534
--------------+----------------------------------------------------------------
var(e.infan~t)|   55.10189   11.79652                        36.219    83.82944
  var(e.lrhom)|   .1579471   .0317723                      .1064844    .2342812
-------------------------------------------------------------------------------

. outreg2 using `file', replace `opt'  addnote(`iv'->`iv2')
check eret list for the existence of e(r2)
MAR03-MedModel.xml
dir : seeout

. 
. //      #5
. //      Mediation Model Frasher through infant mort to `dv' nation & year fixe
> d effects 
. sem ( `iv'-> `iv2', ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' `iyear
> ' ->`dv')  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: infantmort lrhom

Exogenous variables
  Observed: fraser edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7
            i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24
            i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40
            i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56
            i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72
            i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88 x1 x2
            x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19

Fitting target model:
Iteration 0:   log pseudolikelihood =   98825.38  
Iteration 1:   log pseudolikelihood =   98825.38  

Structural equation model                                Number of obs = 1,524
Estimation method: ml

Log pseudolikelihood = 98825.38

                                    (Std. err. adjusted for 88 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
       fraser |   -5.04121   .9143554    -5.51   0.000    -6.833314   -3.249106
        _cons |   47.32838   7.007703     6.75   0.000     33.59354    61.06323
  ------------+----------------------------------------------------------------
  lrhom       |
   infantmort |   -.019624   .0115303    -1.70   0.089    -.0422229    .0029749
       fraser |  -.2131593   .0812442    -2.62   0.009     -.372395   -.0539235
          edu |   2.189186   1.174313     1.86   0.062    -.1124258    4.490798
        unemp |   .0007473   .0081576     0.09   0.927    -.0152414    .0167359
     popdense |  -.0003121   .0001302    -2.40   0.017    -.0005673   -.0000568
     perurban |   .0313482   .0225284     1.39   0.164    -.0128067    .0755031
     sexratio |  -.0068433   .0085649    -0.80   0.424    -.0236302    .0099435
           i1 |   1.084495   .8398209     1.29   0.197    -.5615236    2.730514
           i2 |  -.7059506   .2595234    -2.72   0.007    -1.214607   -.1972942
           i3 |   -2.03952   .1553657   -13.13   0.000    -2.344031   -1.735009
           i4 |   -1.53153   .5357439    -2.86   0.004    -2.581569   -.4814918
           i5 |   1.467787   .2091437     7.02   0.000     1.057873    1.877702
           i6 |  -2.065269   .4978035    -4.15   0.000    -3.040946   -1.089592
           i7 |  -.5305419    .475934    -1.11   0.265    -1.463355    .4022716
           i8 |   1.790144    1.10777     1.62   0.106    -.3810447    3.961332
           i9 |  -2.214014   .3691979    -6.00   0.000    -2.937628   -1.490399
          i10 |   1.793472   .3364285     5.33   0.000     1.134084     2.45286
          i11 |   2.825036   .8742208     3.23   0.001     1.111595    4.538477
          i12 |  -1.811283    .304741    -5.94   0.000    -2.408564   -1.214001
          i13 |  -.8110844    .281516    -2.88   0.004    -1.362846   -.2593233
          i14 |  -1.430038   .0433882   -32.96   0.000    -1.515077   -1.344998
          i15 |   1.280842   1.443582     0.89   0.375    -1.548527    4.110211
          i16 |  -.2777279    .201473    -1.38   0.168    -.6726077    .1171519
          i17 |   2.379273   .3553649     6.70   0.000     1.682771    3.075776
          i18 |   1.060577   .3674599     2.89   0.004     .3403688    1.780785
          i19 |  -.7439755   .6674227    -1.11   0.265      -2.0521     .564149
          i20 |  -.9177663   .3817384    -2.40   0.016     -1.66596   -.1695728
          i21 |  -1.749684   .2112345    -8.28   0.000    -2.163696   -1.335672
          i22 |  -2.409716    .129509   -18.61   0.000    -2.663549   -2.155883
          i23 |   1.512881   .4268928     3.54   0.000     .6761868    2.349576
          i24 |   1.520752    .533801     2.85   0.004     .4745217    2.566983
          i25 |    3.37207   .5334079     6.32   0.000      2.32661    4.417531
          i26 |   .1518384   .3012459     0.50   0.614    -.4385927    .7422695
          i27 |   -.439545   .7107518    -0.62   0.536    -1.832593     .953503
          i28 |  -1.515833   .0790031   -19.19   0.000    -1.670677    -1.36099
          i29 |  -2.180053   .1707034   -12.77   0.000    -2.514626   -1.845481
          i30 |  -.5018346   .5810715    -0.86   0.388    -1.640714    .6370447
          i31 |  -2.410126   .1324691   -18.19   0.000    -2.669761   -2.150491
          i32 |  -1.605343   .2388359    -6.72   0.000    -2.073453   -1.137233
          i33 |   3.784608   .8781781     4.31   0.000     2.063411    5.505805
          i34 |   3.365906   1.265598     2.66   0.008     .8853787    5.846433
          i35 |  -1.010284   .3309798    -3.05   0.002    -1.658993   -.3615755
          i36 |  -2.857829   .2592627   -11.02   0.000    -3.365975   -2.349684
          i37 |  -1.498634   .4632005    -3.24   0.001     -2.40649   -.5907772
          i38 |  -1.369446   .2373045    -5.77   0.000    -1.834555   -.9043382
          i39 |  -1.566808   .3515522    -4.46   0.000    -2.255837   -.8777779
          i40 |   .2940341   .6783883     0.43   0.665    -1.035583    1.623651
          i41 |  -2.913846   .1926909   -15.12   0.000    -3.291513   -2.536179
          i42 |   1.191207   .5646735     2.11   0.035     .0844674    2.297947
          i43 |  -1.001599   .3224176    -3.11   0.002    -1.633526   -.3696726
          i44 |  -1.532894    .113381   -13.52   0.000    -1.755116   -1.310671
          i45 |  -1.737238    .568167    -3.06   0.002    -2.850824   -.6236506
          i46 |   1.632406   1.038644     1.57   0.116    -.4032985    3.668111
          i47 |   .5095413   .3223592     1.58   0.114    -.1222711    1.141354
          i48 |   .2237755   .3446551     0.65   0.516     -.451736     .899287
          i49 |  -2.202529   .1989399   -11.07   0.000    -2.592444   -1.812614
          i50 |  -1.787796   .3984831    -4.49   0.000    -2.568809   -1.006784
          i51 |  -1.648878   .4019198    -4.10   0.000    -2.436627   -.8611302
          i52 |   1.234934    .913832     1.35   0.177    -.5561443    3.026011
          i53 |   1.485542   .3262541     4.55   0.000     .8460959    2.124989
          i54 |   1.484458   .9082725     1.63   0.102    -.2957233    3.264639
          i55 |  -.7360694    .491857    -1.50   0.135    -1.700091    .2279526
          i56 |  -3.511104   .6973343    -5.04   0.000    -4.877854   -2.144354
          i57 |  -2.035977   .1313599   -15.50   0.000    -2.293438   -1.778517
          i58 |  -1.808144   .1442257   -12.54   0.000    -2.090821   -1.525466
          i59 |   1.783339   .6902094     2.58   0.010     .4305534    3.136125
          i60 |  -2.270503   .1188033   -19.11   0.000    -2.503353   -2.037653
          i61 |   1.868523   .4386636     4.26   0.000     1.008758    2.728288
          i62 |   1.894801   .6043054     3.14   0.002     .7103841    3.079218
          i63 |  -.5085947   .2768262    -1.84   0.066    -1.051164    .0339746
          i64 |    2.66786   .8216862     3.25   0.001     1.057384    4.278335
          i65 |  -1.241581   .5127176    -2.42   0.015    -2.246489   -.2366734
          i66 |  -.9214991   .5376758    -1.71   0.087    -1.975324    .1323261
          i67 |  -1.709557   1.835737    -0.93   0.352    -5.307535     1.88842
          i68 |   .0664864   .6477579     0.10   0.918    -1.203096    1.336069
          i69 |   .8257239   .2908243     2.84   0.005     .2557187    1.395729
          i70 |  -.3303616     .69462    -0.48   0.634    -1.691792    1.031069
          i71 |   -.831275   1.119841    -0.74   0.458    -3.026124    1.363574
          i72 |   -.793644    .638596    -1.24   0.214    -2.045269    .4579812
          i73 |  -1.298754    .691683    -1.88   0.060    -2.654428    .0569193
          i74 |   1.808299   .5697972     3.17   0.002     .6915171    2.925081
          i75 |  -1.866121   .1933571    -9.65   0.000    -2.245094   -1.487148
          i76 |  -2.202851   .0977846   -22.53   0.000    -2.394505   -2.011197
          i77 |  -1.958466   .1629351   -12.02   0.000    -2.277813   -1.639119
          i78 |  -.6138947   .8055381    -0.76   0.446     -2.19272     .964931
          i79 |   1.254711   .9423493     1.33   0.183    -.5922597    3.101682
          i80 |   2.668083   .6061958     4.40   0.000     1.479961    3.856205
          i81 |   -.668269   .3663866    -1.82   0.068    -1.386373    .0498355
          i82 |   .2569407   .4050092     0.63   0.526    -.5368627    1.050744
          i83 |  -.0985151   .7012634    -0.14   0.888    -1.472966    1.275936
          i84 |  -1.975025   .9744787    -2.03   0.043    -3.884968   -.0650817
          i85 |  -2.787152   .0402447   -69.26   0.000    -2.866031   -2.708274
          i87 |  -.2017339   .3522674    -0.57   0.567    -.8921653    .4886974
          i88 |   1.245047   .3903254     3.19   0.001     .4800228     2.01007
           x1 |    1.00484   .1737394     5.78   0.000     .6643166    1.345363
           x2 |   .9321963   .1635577     5.70   0.000     .6116291    1.252764
           x3 |   .9498341   .1484118     6.40   0.000     .6589523    1.240716
           x4 |   .8829149   .1408649     6.27   0.000     .6068247    1.159005
           x5 |   .8076558   .1396752     5.78   0.000     .5338975    1.081414
           x6 |    .861136   .1476994     5.83   0.000     .5716506    1.150621
           x7 |   .7316329   .1091216     6.70   0.000     .5177584    .9455073
           x8 |   .6558247   .0983703     6.67   0.000     .4630225    .8486269
           x9 |    .628296   .0896976     7.00   0.000     .4524919    .8041001
          x10 |   .6129153   .1062625     5.77   0.000     .4046446     .821186
          x11 |   .5089706   .0836684     6.08   0.000     .3449836    .6729575
          x12 |   .4964474   .0935701     5.31   0.000     .3130534    .6798414
          x13 |   .4081594   .0679147     6.01   0.000      .275049    .5412698
          x14 |   .3168834   .0749881     4.23   0.000     .1699094    .4638574
          x15 |   .3055543   .0614651     4.97   0.000     .1850849    .4260238
          x16 |    .286172   .0566067     5.06   0.000     .1752249    .3971192
          x17 |   .1978082   .0517577     3.82   0.000      .096365    .2992515
          x18 |   .1561449   .0499727     3.12   0.002     .0582002    .2540895
          x19 |   .0102841   .0518791     0.20   0.843    -.0913971    .1119654
        _cons |   -.653639   2.517861    -0.26   0.795    -5.588555    4.281277
--------------+----------------------------------------------------------------
var(e.infan~t)|   55.10189   11.79652                        36.219    83.82944
  var(e.lrhom)|   .1412735   .0287645                      .0947871    .2105584
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(`iv'->`iv2' nationXyear)
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel.xml
dir : seeout

. 
. //      #6
. //      Mediation model Infant mort -> Frasher to `dv' nation fixed effects
. sem ( `iv2' -> `iv', ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv
> ')  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: fraser lrhom

Exogenous variables
  Observed: infantmort edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6
            i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23
            i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39
            i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55
            i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71
            i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:   log pseudolikelihood =  93201.502  
Iteration 1:   log pseudolikelihood =  93201.502  

Structural equation model                                Number of obs = 1,524
Estimation method: ml

Log pseudolikelihood = 93201.502

                                   (Std. err. adjusted for 88 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
             | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
Structural   |
  fraser     |
  infantmort |  -.0441718   .0082882    -5.33   0.000    -.0604162   -.0279273
       _cons |   7.770381   .0926613    83.86   0.000     7.588768    7.951994
  -----------+----------------------------------------------------------------
  lrhom      |
      fraser |  -.2445491   .0868006    -2.82   0.005    -.4146753    -.074423
  infantmort |   .0044805   .0135553     0.33   0.741    -.0220874    .0310483
         edu |   -2.72643   .8117702    -3.36   0.001    -4.317471    -1.13539
       unemp |   .0035128   .0080455     0.44   0.662     -.012256    .0192817
    popdense |  -.0003394   .0001026    -3.31   0.001    -.0005404   -.0001384
    perurban |   .0094687   .0227352     0.42   0.677    -.0350914    .0540288
    sexratio |  -.0122216   .0070836    -1.73   0.084    -.0261053    .0016621
          i1 |  -1.045325    .709145    -1.47   0.140    -2.435223     .344574
          i2 |  -1.130044   .2881723    -3.92   0.000    -1.694851   -.5652364
          i3 |  -1.395195    .087864   -15.88   0.000    -1.567405   -1.222984
          i4 |  -2.337424   .5187444    -4.51   0.000    -3.354144   -1.320703
          i5 |   .5777208   .1629944     3.54   0.000     .2582577    .8971839
          i6 |  -2.615991   .4396732    -5.95   0.000    -3.477734   -1.754247
          i7 |  -2.088781   .3362744    -6.21   0.000    -2.747866   -1.429695
          i8 |   -.103645   1.041856    -0.10   0.921    -2.145646    1.938356
          i9 |  -1.692117   .3636858    -4.65   0.000    -2.404928   -.9793056
         i10 |   .2660293   .2653989     1.00   0.316     -.254143    .7862015
         i11 |   .6118322     .75118     0.81   0.415    -.8604535    2.084118
         i12 |  -3.084946   .1937938   -15.92   0.000    -3.464775   -2.705117
         i13 |  -1.778581   .2018686    -8.81   0.000    -2.174236   -1.382925
         i14 |  -1.542819   .0398473   -38.72   0.000    -1.620919    -1.46472
         i15 |  -.9283623   1.393444    -0.67   0.505    -3.659462    1.802737
         i16 |  -.8436543   .2015415    -4.19   0.000    -1.238668   -.4486403
         i17 |   .6907925   .2057185     3.36   0.001     .2875916    1.093993
         i18 |  -.3281202   .2436278    -1.35   0.178    -.8056219    .1493816
         i19 |  -2.002986   .6138129    -3.26   0.001    -3.206037   -.7999345
         i20 |  -1.731619    .342898    -5.05   0.000    -2.403686   -1.059551
         i21 |   -2.04846   .2072661    -9.88   0.000    -2.454694   -1.642226
         i22 |  -2.077648   .1112984   -18.67   0.000    -2.295789   -1.859507
         i23 |  -.5786158   .2518213    -2.30   0.022    -1.072177   -.0850551
         i24 |  -.3306632   .4042694    -0.82   0.413    -1.123017    .4616903
         i25 |   1.098139    .296068     3.71   0.000     .5178567    1.678422
         i26 |  -.2394591   .2890992    -0.83   0.408    -.8060832     .327165
         i27 |  -2.100319   .6322243    -3.32   0.001    -3.339456   -.8611826
         i28 |  -1.268604   .0706405   -17.96   0.000    -1.407057   -1.130151
         i29 |  -2.656147   .1419577   -18.71   0.000    -2.934379   -2.377915
         i30 |  -1.808908   .5071887    -3.57   0.000     -2.80298   -.8148367
         i31 |  -2.309224   .1406221   -16.42   0.000    -2.584838    -2.03361
         i32 |  -2.197565    .205333   -10.70   0.000     -2.60001   -1.795119
         i33 |   .3250852   .5687966     0.57   0.568    -.7897356    1.439906
         i34 |   .0454986   1.079177     0.04   0.966    -2.069649    2.160646
         i35 |  -1.720421   .2963341    -5.81   0.000    -2.301225   -1.139617
         i36 |  -2.484083    .249361    -9.96   0.000    -2.972822   -1.995345
         i37 |  -1.841113   .4710368    -3.91   0.000    -2.764329   -.9178982
         i38 |  -1.192939    .247807    -4.81   0.000    -1.678631   -.7072457
         i39 |  -2.379283   .3055298    -7.79   0.000     -2.97811   -1.780455
         i40 |  -1.643038   .5443016    -3.02   0.003    -2.709849   -.5762259
         i41 |  -3.035627    .205088   -14.80   0.000    -3.437592   -2.633662
         i42 |  -.1398304   .5061659    -0.28   0.782    -1.131897    .8522365
         i43 |  -2.242089   .2927871    -7.66   0.000    -2.815941   -1.668237
         i44 |  -1.637052    .111296   -14.71   0.000    -1.855188   -1.418916
         i45 |  -2.510095    .558065    -4.50   0.000    -3.603882   -1.416308
         i46 |  -.8042216   .9248023    -0.87   0.385    -2.616801    1.008358
         i47 |   -.099882   .2862483    -0.35   0.727    -.6609183    .4611543
         i48 |  -.2881741   .3241604    -0.89   0.374    -.9235168    .3471686
         i49 |  -2.498085   .2119697   -11.79   0.000    -2.913538   -2.082632
         i50 |  -3.078573   .3130779    -9.83   0.000    -3.692194   -2.464952
         i51 |  -1.958562   .4153241    -4.72   0.000    -2.772583   -1.144542
         i52 |  -.8901462   .7951155    -1.12   0.263    -2.448544    .6682516
         i53 |  -.1152236   .1874105    -0.61   0.539    -.4825415    .2520943
         i54 |  -.5912832   .8094775    -0.73   0.465     -2.17783    .9952635
         i55 |  -1.761663   .4308476    -4.09   0.000    -2.606109   -.9172176
         i56 |  -4.409271    .580708    -7.59   0.000    -5.547438   -3.271105
         i57 |  -1.891163     .12895   -14.67   0.000      -2.1439   -1.638425
         i58 |  -1.377831   .1146165   -12.02   0.000    -1.602475   -1.153187
         i59 |  -.9060566    .443542    -2.04   0.041    -1.775383   -.0367303
         i60 |  -2.036392   .1237743   -16.45   0.000    -2.278985   -1.793798
         i61 |   .2083743   .2948479     0.71   0.480    -.3695169    .7862656
         i62 |  -.3788027   .4194767    -0.90   0.367    -1.200962    .4433565
         i63 |   -1.88563   .1457783   -12.93   0.000     -2.17135    -1.59991
         i64 |   .1990901   .6644192     0.30   0.764    -1.103148    1.501328
         i65 |  -1.991011   .4941373    -4.03   0.000    -2.959502    -1.02252
         i66 |  -2.189359    .466603    -4.69   0.000    -3.103884   -1.274834
         i67 |  -1.506146    1.51622    -0.99   0.321    -4.477881     1.46559
         i68 |  -1.386576   .5797013    -2.39   0.017    -2.522769   -.2503818
         i69 |  -.0203849   .2447433    -0.08   0.934     -.500073    .4593033
         i70 |  -1.761636   .6208998    -2.84   0.005    -2.978577   -.5446943
         i71 |  -.6208204   1.012045    -0.61   0.540    -2.604391    1.362751
         i72 |  -1.902992   .5960711    -3.19   0.001     -3.07127    -.734714
         i73 |  -1.944202   .7001017    -2.78   0.005    -3.316376   -.5720279
         i74 |  -.4566538   .4059579    -1.12   0.261    -1.252317     .339009
         i75 |  -2.402966   .1580711   -15.20   0.000    -2.712779   -2.093152
         i76 |  -1.966596   .0904998   -21.73   0.000    -2.143973    -1.78922
         i77 |  -2.158439   .1616329   -13.35   0.000    -2.475234   -1.841644
         i78 |  -3.191131   .6225071    -5.13   0.000    -4.411223   -1.971039
         i79 |  -1.108172   .8190238    -1.35   0.176    -2.713429    .4970853
         i80 |   .8847068   .4907662     1.80   0.071    -.0771773    1.846591
         i81 |   -2.28424   .2058674   -11.10   0.000    -2.687733   -1.880748
         i82 |  -.7451993   .3581336    -2.08   0.037    -1.447128   -.0432703
         i83 |  -1.947157   .5585714    -3.49   0.000    -3.041937   -.8523775
         i84 |  -4.967699   .7739919    -6.42   0.000    -6.484696   -3.450703
         i85 |  -2.731687   .0383965   -71.14   0.000    -2.806942   -2.656431
         i87 |  -.8858283   .3748665    -2.36   0.018    -1.620553   -.1511035
         i88 |  -.0631642   .3762448    -0.17   0.867    -.8005904     .674262
       _cons |    6.59381   2.020235     3.26   0.001     2.634222     10.5534
-------------+----------------------------------------------------------------
var(e.fraser)|   .4828101   .1111906                      .3074296    .7582407
 var(e.lrhom)|   .1579471   .0317723                      .1064844    .2342812
------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(`iv2'->`iv')
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel.xml
dir : seeout

. 
. //      #7
. //      Mediation model Infant mort -> Faser to `dv' nation and year fixed eff
> ects
. sem ( `iv2'-> `iv', ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' `iyear
> ' ->`dv')  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: fraser lrhom

Exogenous variables
  Observed: infantmort edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6
            i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23
            i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39
            i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55
            i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71
            i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88 x1
            x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19

Fitting target model:
Iteration 0:   log pseudolikelihood =  99466.955  
Iteration 1:   log pseudolikelihood =  99466.955  

Structural equation model                                Number of obs = 1,524
Estimation method: ml

Log pseudolikelihood = 99466.955

                                   (Std. err. adjusted for 88 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
             | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
Structural   |
  fraser     |
  infantmort |  -.0441718   .0082882    -5.33   0.000    -.0604162   -.0279273
       _cons |   7.770381   .0926613    83.86   0.000     7.588768    7.951994
  -----------+----------------------------------------------------------------
  lrhom      |
      fraser |  -.2131593   .0812442    -2.62   0.009     -.372395   -.0539235
  infantmort |   -.019624   .0115303    -1.70   0.089    -.0422229    .0029749
         edu |   2.189186   1.174313     1.86   0.062    -.1124258    4.490798
       unemp |   .0007473   .0081576     0.09   0.927    -.0152414    .0167359
    popdense |  -.0003121   .0001302    -2.40   0.017    -.0005673   -.0000568
    perurban |   .0313482   .0225284     1.39   0.164    -.0128067    .0755031
    sexratio |  -.0068433   .0085649    -0.80   0.424    -.0236302    .0099435
          i1 |   1.084495   .8398209     1.29   0.197    -.5615236    2.730514
          i2 |  -.7059506   .2595234    -2.72   0.007    -1.214607   -.1972942
          i3 |   -2.03952   .1553657   -13.13   0.000    -2.344031   -1.735009
          i4 |   -1.53153   .5357439    -2.86   0.004    -2.581569   -.4814918
          i5 |   1.467787   .2091437     7.02   0.000     1.057873    1.877702
          i6 |  -2.065269   .4978035    -4.15   0.000    -3.040946   -1.089592
          i7 |  -.5305419    .475934    -1.11   0.265    -1.463355    .4022716
          i8 |   1.790144    1.10777     1.62   0.106    -.3810447    3.961332
          i9 |  -2.214014   .3691979    -6.00   0.000    -2.937628   -1.490399
         i10 |   1.793472   .3364285     5.33   0.000     1.134084     2.45286
         i11 |   2.825036   .8742208     3.23   0.001     1.111595    4.538477
         i12 |  -1.811283    .304741    -5.94   0.000    -2.408564   -1.214001
         i13 |  -.8110844    .281516    -2.88   0.004    -1.362846   -.2593233
         i14 |  -1.430038   .0433882   -32.96   0.000    -1.515077   -1.344998
         i15 |   1.280842   1.443582     0.89   0.375    -1.548527    4.110211
         i16 |  -.2777279    .201473    -1.38   0.168    -.6726077    .1171519
         i17 |   2.379273   .3553649     6.70   0.000     1.682771    3.075776
         i18 |   1.060577   .3674599     2.89   0.004     .3403688    1.780785
         i19 |  -.7439755   .6674227    -1.11   0.265      -2.0521     .564149
         i20 |  -.9177663   .3817384    -2.40   0.016     -1.66596   -.1695728
         i21 |  -1.749684   .2112345    -8.28   0.000    -2.163696   -1.335672
         i22 |  -2.409716    .129509   -18.61   0.000    -2.663549   -2.155883
         i23 |   1.512881   .4268928     3.54   0.000     .6761868    2.349576
         i24 |   1.520752    .533801     2.85   0.004     .4745217    2.566983
         i25 |    3.37207   .5334079     6.32   0.000      2.32661    4.417531
         i26 |   .1518384   .3012459     0.50   0.614    -.4385927    .7422695
         i27 |   -.439545   .7107518    -0.62   0.536    -1.832593     .953503
         i28 |  -1.515833   .0790031   -19.19   0.000    -1.670677    -1.36099
         i29 |  -2.180053   .1707034   -12.77   0.000    -2.514626   -1.845481
         i30 |  -.5018346   .5810715    -0.86   0.388    -1.640714    .6370447
         i31 |  -2.410126   .1324691   -18.19   0.000    -2.669761   -2.150491
         i32 |  -1.605343   .2388359    -6.72   0.000    -2.073453   -1.137233
         i33 |   3.784608   .8781781     4.31   0.000     2.063411    5.505805
         i34 |   3.365906   1.265598     2.66   0.008     .8853787    5.846433
         i35 |  -1.010284   .3309798    -3.05   0.002    -1.658993   -.3615755
         i36 |  -2.857829   .2592627   -11.02   0.000    -3.365975   -2.349684
         i37 |  -1.498634   .4632005    -3.24   0.001     -2.40649   -.5907772
         i38 |  -1.369446   .2373045    -5.77   0.000    -1.834555   -.9043382
         i39 |  -1.566808   .3515522    -4.46   0.000    -2.255837   -.8777779
         i40 |   .2940341   .6783883     0.43   0.665    -1.035583    1.623651
         i41 |  -2.913846   .1926909   -15.12   0.000    -3.291513   -2.536179
         i42 |   1.191207   .5646735     2.11   0.035     .0844674    2.297947
         i43 |  -1.001599   .3224176    -3.11   0.002    -1.633526   -.3696726
         i44 |  -1.532894    .113381   -13.52   0.000    -1.755116   -1.310671
         i45 |  -1.737238    .568167    -3.06   0.002    -2.850824   -.6236506
         i46 |   1.632406   1.038644     1.57   0.116    -.4032985    3.668111
         i47 |   .5095413   .3223592     1.58   0.114    -.1222711    1.141354
         i48 |   .2237755   .3446551     0.65   0.516     -.451736     .899287
         i49 |  -2.202529   .1989399   -11.07   0.000    -2.592444   -1.812614
         i50 |  -1.787796   .3984831    -4.49   0.000    -2.568809   -1.006784
         i51 |  -1.648878   .4019198    -4.10   0.000    -2.436627   -.8611302
         i52 |   1.234934    .913832     1.35   0.177    -.5561443    3.026011
         i53 |   1.485542   .3262541     4.55   0.000     .8460959    2.124989
         i54 |   1.484458   .9082725     1.63   0.102    -.2957233    3.264639
         i55 |  -.7360694    .491857    -1.50   0.135    -1.700091    .2279526
         i56 |  -3.511104   .6973343    -5.04   0.000    -4.877854   -2.144354
         i57 |  -2.035977   .1313599   -15.50   0.000    -2.293438   -1.778517
         i58 |  -1.808144   .1442257   -12.54   0.000    -2.090821   -1.525466
         i59 |   1.783339   .6902094     2.58   0.010     .4305534    3.136125
         i60 |  -2.270503   .1188033   -19.11   0.000    -2.503353   -2.037653
         i61 |   1.868523   .4386636     4.26   0.000     1.008758    2.728288
         i62 |   1.894801   .6043054     3.14   0.002     .7103841    3.079218
         i63 |  -.5085947   .2768262    -1.84   0.066    -1.051164    .0339746
         i64 |    2.66786   .8216862     3.25   0.001     1.057384    4.278335
         i65 |  -1.241581   .5127176    -2.42   0.015    -2.246489   -.2366734
         i66 |  -.9214991   .5376758    -1.71   0.087    -1.975324    .1323261
         i67 |  -1.709557   1.835737    -0.93   0.352    -5.307535     1.88842
         i68 |   .0664864   .6477579     0.10   0.918    -1.203096    1.336069
         i69 |   .8257239   .2908243     2.84   0.005     .2557187    1.395729
         i70 |  -.3303616     .69462    -0.48   0.634    -1.691792    1.031069
         i71 |   -.831275   1.119841    -0.74   0.458    -3.026124    1.363574
         i72 |   -.793644    .638596    -1.24   0.214    -2.045269    .4579812
         i73 |  -1.298754    .691683    -1.88   0.060    -2.654428    .0569193
         i74 |   1.808299   .5697972     3.17   0.002     .6915171    2.925081
         i75 |  -1.866121   .1933571    -9.65   0.000    -2.245094   -1.487148
         i76 |  -2.202851   .0977846   -22.53   0.000    -2.394505   -2.011197
         i77 |  -1.958466   .1629351   -12.02   0.000    -2.277813   -1.639119
         i78 |  -.6138947   .8055381    -0.76   0.446     -2.19272     .964931
         i79 |   1.254711   .9423493     1.33   0.183    -.5922597    3.101682
         i80 |   2.668083   .6061958     4.40   0.000     1.479961    3.856205
         i81 |   -.668269   .3663866    -1.82   0.068    -1.386373    .0498355
         i82 |   .2569407   .4050092     0.63   0.526    -.5368627    1.050744
         i83 |  -.0985151   .7012634    -0.14   0.888    -1.472966    1.275936
         i84 |  -1.975025   .9744787    -2.03   0.043    -3.884968   -.0650817
         i85 |  -2.787152   .0402447   -69.26   0.000    -2.866031   -2.708274
         i87 |  -.2017339   .3522674    -0.57   0.567    -.8921653    .4886974
         i88 |   1.245047   .3903254     3.19   0.001     .4800228     2.01007
          x1 |    1.00484   .1737394     5.78   0.000     .6643166    1.345363
          x2 |   .9321963   .1635577     5.70   0.000     .6116291    1.252764
          x3 |   .9498341   .1484118     6.40   0.000     .6589523    1.240716
          x4 |   .8829149   .1408649     6.27   0.000     .6068247    1.159005
          x5 |   .8076558   .1396752     5.78   0.000     .5338975    1.081414
          x6 |    .861136   .1476994     5.83   0.000     .5716506    1.150621
          x7 |   .7316329   .1091216     6.70   0.000     .5177584    .9455073
          x8 |   .6558247   .0983703     6.67   0.000     .4630225    .8486269
          x9 |    .628296   .0896976     7.00   0.000     .4524919    .8041001
         x10 |   .6129153   .1062625     5.77   0.000     .4046446     .821186
         x11 |   .5089706   .0836684     6.08   0.000     .3449836    .6729575
         x12 |   .4964474   .0935701     5.31   0.000     .3130534    .6798414
         x13 |   .4081594   .0679147     6.01   0.000      .275049    .5412698
         x14 |   .3168834   .0749881     4.23   0.000     .1699094    .4638574
         x15 |   .3055543   .0614651     4.97   0.000     .1850849    .4260238
         x16 |    .286172   .0566067     5.06   0.000     .1752249    .3971192
         x17 |   .1978082   .0517577     3.82   0.000      .096365    .2992515
         x18 |   .1561449   .0499727     3.12   0.002     .0582002    .2540895
         x19 |   .0102841   .0518791     0.20   0.843    -.0913971    .1119654
       _cons |   -.653639   2.517861    -0.26   0.795    -5.588555    4.281277
-------------+----------------------------------------------------------------
var(e.fraser)|   .4828101   .1111906                      .3074296    .7582407
 var(e.lrhom)|   .1412735   .0287645                      .0947871    .2105584
------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(`iv2'->`iv' nationXyear)
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel.xml
dir : seeout

. 
. //      #8
. //      Mediation model for hertiage -> infant 
. sem ( heritage-> `iv2', ) (heritage `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid
> ' ->`dv')  ,  vce(cluster CID) nocapslatent
(37 observations with missing values excluded)

Endogenous variables
  Observed: infantmort lrhom

Exogenous variables
  Observed: heritage edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7
            i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24
            i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40
            i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56
            i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72
            i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:   log pseudolikelihood =  84628.769  
Iteration 1:   log pseudolikelihood =  84628.769  

Structural equation model                                Number of obs = 1,487
Estimation method: ml

Log pseudolikelihood = 84628.769

                                    (Std. err. adjusted for 87 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
     heritage |  -.4461874   .0701036    -6.36   0.000     -.583588   -.3087868
        _cons |   40.02408   5.127226     7.81   0.000      29.9749    50.07326
  ------------+----------------------------------------------------------------
  lrhom       |
   infantmort |   .0087281   .0136044     0.64   0.521     -.017936    .0353922
     heritage |  -.0214634   .0057402    -3.74   0.000    -.0327139   -.0102129
          edu |  -2.549563    .811931    -3.14   0.002    -4.140919   -.9582077
        unemp |   .0031722   .0084318     0.38   0.707    -.0133539    .0196983
     popdense |  -.0003789   .0000977    -3.88   0.000    -.0005704   -.0001875
     perurban |   .0066231    .021848     0.30   0.762    -.0361982    .0494445
     sexratio |  -.0105191   .0066693    -1.58   0.115    -.0235908    .0025525
           i1 |  -1.238525   .6742197    -1.84   0.066    -2.559971    .0829217
           i2 |  -1.040009   .2937245    -3.54   0.000    -1.615699   -.4643199
           i3 |  -1.289802    .087383   -14.76   0.000    -1.461069   -1.118534
           i4 |  -2.408287   .4912518    -4.90   0.000    -3.371123   -1.445451
           i5 |   .7230277   .1728698     4.18   0.000     .3842091    1.061846
           i6 |  -2.341562   .4353928    -5.38   0.000    -3.194916   -1.488208
           i7 |  -2.155056   .3238418    -6.65   0.000    -2.789774   -1.520337
           i8 |   .1121288   .9463315     0.12   0.906    -1.742647    1.966905
           i9 |  -1.630095   .3596082    -4.53   0.000    -2.334914   -.9252762
          i10 |   .3220739    .281685     1.14   0.253    -.2300185    .8741663
          i11 |   .6007767   .6882253     0.87   0.383    -.7481202    1.949674
          i12 |  -2.958404    .160058   -18.48   0.000    -3.272112   -2.644696
          i13 |  -1.854426   .1898271    -9.77   0.000    -2.226481   -1.482372
          i14 |  -1.491461   .0350998   -42.49   0.000    -1.560256   -1.422667
          i15 |   -.984001    1.29657    -0.76   0.448    -3.525232     1.55723
          i16 |  -.6954049   .2068768    -3.36   0.001    -1.100876   -.2899338
          i17 |    .877788   .1997136     4.40   0.000     .4863566     1.26922
          i18 |  -.3677284   .2296719    -1.60   0.109     -.817877    .0824202
          i19 |  -2.119542   .5731403    -3.70   0.000    -3.242877    -.996208
          i20 |  -1.719635   .3161824    -5.44   0.000    -2.339342   -1.099929
          i21 |  -2.038752   .1838604   -11.09   0.000    -2.399112   -1.678392
          i22 |  -2.039237   .1101373   -18.52   0.000    -2.255102   -1.823372
          i23 |  -.7181686   .2723844    -2.64   0.008    -1.252032   -.1843049
          i24 |   -.425344   .3585845    -1.19   0.236    -1.128157    .2774686
          i25 |   1.107633   .2848508     3.89   0.000      .549336    1.665931
          i26 |  -.1801948   .2667692    -0.68   0.499    -.7030529    .3426632
          i27 |  -2.277161   .5896609    -3.86   0.000    -3.432875   -1.121447
          i28 |  -1.247246   .0691213   -18.04   0.000    -1.382721    -1.11177
          i29 |  -2.785899   .1526169   -18.25   0.000    -3.085022   -2.486775
          i30 |  -1.942109   .4878386    -3.98   0.000    -2.898255   -.9859629
          i31 |  -2.321849   .1271253   -18.26   0.000     -2.57101   -2.072688
          i32 |  -2.293799   .2038588   -11.25   0.000    -2.693355   -1.894243
          i33 |   .0857646     .55249     0.16   0.877    -.9970959    1.168625
          i34 |  -.1831683   1.014632    -0.18   0.857     -2.17181    1.805473
          i35 |   -1.75855   .2707949    -6.49   0.000    -2.289298   -1.227802
          i36 |  -2.325332   .2483406    -9.36   0.000     -2.81207   -1.838593
          i37 |  -1.786744   .4443423    -4.02   0.000    -2.657639   -.9158492
          i38 |   -1.12469   .2488331    -4.52   0.000    -1.612394   -.6369865
          i39 |  -2.514171   .2965223    -8.48   0.000    -3.095344   -1.932998
          i40 |  -1.743116    .515104    -3.38   0.001    -2.752701   -.7335305
          i41 |  -3.005118   .2034875   -14.77   0.000    -3.403947    -2.60629
          i42 |  -.2124965   .4630833    -0.46   0.646    -1.120123      .69513
          i43 |  -2.225547   .3024825    -7.36   0.000    -2.818402   -1.632692
          i44 |  -1.559179   .0885106   -17.62   0.000    -1.732656   -1.385701
          i45 |  -2.399721    .554202    -4.33   0.000    -3.485937   -1.313506
          i46 |  -.9871595   .8697104    -1.14   0.256    -2.691761    .7174415
          i47 |  -.1951592   .2757671    -0.71   0.479    -.7356528    .3453343
          i48 |  -.2772682   .2993435    -0.93   0.354    -.8639708    .3094343
          i49 |  -2.331273   .2128616   -10.95   0.000    -2.748474   -1.914072
          i50 |   -2.94681   .2575055   -11.44   0.000    -3.451511   -2.442108
          i51 |  -1.928654   .4121128    -4.68   0.000     -2.73638   -1.120928
          i52 |   -.944454   .7530424    -1.25   0.210     -2.42039     .531482
          i53 |  -.0448949   .1904099    -0.24   0.814    -.4180915    .3283016
          i54 |  -.7590975   .7557591    -1.00   0.315    -2.240358    .7221632
          i55 |  -1.828351   .3826137    -4.78   0.000     -2.57826   -1.078441
          i56 |  -4.416262   .5370366    -8.22   0.000    -5.468835    -3.36369
          i57 |  -1.803036   .1274793   -14.14   0.000    -2.052891   -1.553181
          i58 |  -1.299055   .1136971   -11.43   0.000    -1.521898   -1.076213
          i59 |  -1.083714   .4249477    -2.55   0.011    -1.916596   -.2508319
          i60 |  -2.076602   .1103739   -18.81   0.000    -2.292931   -1.860273
          i61 |   .0758322   .2846007     0.27   0.790    -.4819749    .6336392
          i62 |   -.510205   .3948286    -1.29   0.196    -1.284055    .2636447
          i63 |  -1.996606   .1564517   -12.76   0.000    -2.303245   -1.689966
          i64 |   .0347038   .6198898     0.06   0.955    -1.180258    1.249665
          i65 |  -1.969218   .4440657    -4.43   0.000    -2.839571   -1.098866
          i66 |   -2.28468   .4430994    -5.16   0.000    -3.153138   -1.416221
          i67 |  -1.629345   1.427441    -1.14   0.254    -4.427079    1.168389
          i68 |  -1.552796   .5459403    -2.84   0.004    -2.622819   -.4827727
          i69 |  -.0437145   .1989847    -0.22   0.826    -.4337174    .3462884
          i70 |  -1.849372   .5701847    -3.24   0.001    -2.966913   -.7318303
          i71 |  -.1379591   .9833856    -0.14   0.888     -2.06536    1.789441
          i72 |  -1.997164   .5634746    -3.54   0.000    -3.101554   -.8927743
          i73 |  -2.065886    .655628    -3.15   0.002    -3.350894   -.7808789
          i74 |   -.551244    .413175    -1.33   0.182    -1.361052    .2585641
          i75 |  -2.444383   .1634347   -14.96   0.000    -2.764709   -2.124056
          i76 |  -1.946885   .0886438   -21.96   0.000    -2.120623   -1.773146
          i77 |  -2.160706   .1577915   -13.69   0.000    -2.469972    -1.85144
          i78 |   -3.22058   .5488257    -5.87   0.000    -4.296259   -2.144901
          i79 |  -1.053697   .7448789    -1.41   0.157    -2.513633    .4062392
          i80 |    .893734   .4540545     1.97   0.049     .0038035    1.783665
          i81 |  -2.230407   .1810281   -12.32   0.000    -2.585215   -1.875598
          i82 |  -.7033106   .2837354    -2.48   0.013    -1.259422   -.1471994
          i83 |          0  (constrained)
          i84 |  -4.970782   .7008323    -7.09   0.000    -6.344388   -3.597176
          i85 |  -2.701907   .0358748   -75.31   0.000     -2.77222   -2.631594
          i87 |  -.7547705   .3791485    -1.99   0.047    -1.497888    -.011653
          i88 |   .2489915   .3389891     0.73   0.463    -.4154149    .9133979
        _cons |   6.099219   1.728277     3.53   0.000     2.711859    9.486579
--------------+----------------------------------------------------------------
var(e.infan~t)|   55.61977   11.76147                      36.74789    84.18332
  var(e.lrhom)|   .1598744   .0328147                      .1069221     .239051
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(heritage->`iv2')
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel.xml
dir : seeout

. 
. /*
> //      #10
> //      Mediation model for heritage -> infant nation and year fixed effects
> sem ( heritage-> `iv2', ) (heritage `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid
> ' `iyear'->`dv')  ,  vce(cluster CID) nocapslatent
> outreg2 using `file', append `opt' 
> */
. 
. //      #11
. //      Mediation models for rol => infant 
. sem ( rol-> `iv2', ) (rol `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv') 
>  ,  vce(cluster CID) nocapslatent
(145 observations with missing values excluded)

Endogenous variables
  Observed: infantmort lrhom

Exogenous variables
  Observed: rol edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7 i8
            i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25
            i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41
            i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57
            i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73
            i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:   log pseudolikelihood =  85543.515  
Iteration 1:   log pseudolikelihood =  85543.515  

Structural equation model                                Number of obs = 1,379
Estimation method: ml

Log pseudolikelihood = 85543.515

                                    (Std. err. adjusted for 88 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
          rol |  -6.023995   .5501745   -10.95   0.000    -7.102317   -4.945673
        _cons |   13.16126   .7827995    16.81   0.000       11.627    14.69552
  ------------+----------------------------------------------------------------
  lrhom       |
   infantmort |   .0082058   .0144014     0.57   0.569    -.0200204    .0364321
          rol |  -.4731735   .1594876    -2.97   0.003    -.7857634   -.1605836
          edu |  -3.233939   .8423094    -3.84   0.000    -4.884835   -1.583043
        unemp |   .0027268   .0068198     0.40   0.689    -.0106397    .0160933
     popdense |  -.0002294   .0001202    -1.91   0.056    -.0004649    6.22e-06
     perurban |   .0078258   .0249779     0.31   0.754      -.04113    .0567817
     sexratio |  -.0042898   .0083308    -0.51   0.607    -.0206178    .0120382
           i1 |  -2.098122   .8885122    -2.36   0.018    -3.839574   -.3566704
           i2 |  -1.570136   .4007875    -3.92   0.000    -2.355665   -.7846065
           i3 |  -1.224142   .1083755   -11.30   0.000    -1.436555    -1.01173
           i4 |  -2.154451   .5566871    -3.87   0.000    -3.245537   -1.063364
           i5 |    .543332   .1856395     2.93   0.003     .1794852    .9071789
           i6 |  -3.736979   .6127923    -6.10   0.000     -4.93803   -2.535929
           i7 |  -2.897869   .5178576    -5.60   0.000    -3.912851   -1.882886
           i8 |   -.012484   1.114951    -0.01   0.991    -2.197747    2.172779
           i9 |  -1.590664   .4085308    -3.89   0.000     -2.39137   -.7899587
          i10 |  -.2301302   .3502965    -0.66   0.511    -.9166988    .4564383
          i11 |   -.040218   .9073382    -0.04   0.965    -1.818568    1.738132
          i12 |  -3.389631   .2541115   -13.34   0.000     -3.88768   -2.891582
          i13 |  -2.419335   .3576024    -6.77   0.000    -3.120223   -1.718447
          i14 |  -1.400756   .0416619   -33.62   0.000    -1.482412   -1.319101
          i15 |  -1.446363   1.562181    -0.93   0.355    -4.508183    1.615456
          i16 |  -.9488622   .2151307    -4.41   0.000    -1.370511   -.5272138
          i17 |   .0019109   .3537393     0.01   0.996    -.6914054    .6952273
          i18 |  -.7403501   .3217996    -2.30   0.021    -1.371066   -.1096345
          i19 |  -2.409614     .71908    -3.35   0.001    -3.818985   -1.000243
          i20 |  -1.829754   .3988363    -4.59   0.000    -2.611458   -1.048049
          i21 |  -2.184696   .2492008    -8.77   0.000    -2.673121   -1.696271
          i22 |  -1.834426   .1475345   -12.43   0.000    -2.123588   -1.545264
          i23 |   -1.47226   .3911461    -3.76   0.000    -2.238892   -.7056274
          i24 |  -1.185495   .5908413    -2.01   0.045    -2.343522    -.027467
          i25 |   .0955873   .5135384     0.19   0.852    -.9109294    1.102104
          i26 |   -.373925   .3339064    -1.12   0.263     -1.02837    .2805196
          i27 |  -2.804799   .7758849    -3.61   0.000    -4.325505   -1.284092
          i28 |  -.9370587   .0948126    -9.88   0.000    -1.122888   -.7512294
          i29 |   -2.58925   .1362589   -19.00   0.000    -2.856313   -2.322188
          i30 |  -2.550782   .6586519    -3.87   0.000    -3.841716   -1.259848
          i31 |   -2.12628   .1218623   -17.45   0.000    -2.365126   -1.887434
          i32 |  -2.394098   .2663057    -8.99   0.000    -2.916047   -1.872148
          i33 |  -.9821849   .8114752    -1.21   0.226    -2.572647    .6082773
          i34 |  -.7393762   1.264494    -0.58   0.559    -3.217739    1.738987
          i35 |  -1.942712   .3513482    -5.53   0.000    -2.631342   -1.254083
          i36 |  -2.233263   .2887492    -7.73   0.000    -2.799201   -1.667325
          i37 |  -1.783762   .5045788    -3.54   0.000    -2.772718   -.7948057
          i38 |  -1.303983   .2842534    -4.59   0.000     -1.86111   -.7468568
          i39 |  -2.780607   .4051683    -6.86   0.000    -3.574723   -1.986492
          i40 |  -2.378731    .727915    -3.27   0.001    -3.805418   -.9520439
          i41 |  -3.094673   .2408551   -12.85   0.000     -3.56674   -2.622606
          i42 |   -.949716   .6823758    -1.39   0.164    -2.287148    .3877159
          i43 |  -2.781847   .3416645    -8.14   0.000    -3.451497   -2.112197
          i44 |   -1.78529   .1484408   -12.03   0.000    -2.076229   -1.494352
          i45 |    -3.2302   .6237195    -5.18   0.000    -4.452668   -2.007733
          i46 |  -1.947052   1.153019    -1.69   0.091    -4.206927     .312824
          i47 |  -.3146001   .3583694    -0.88   0.380    -1.016991    .3877909
          i48 |  -.4695587   .3861999    -1.22   0.224    -1.226497    .2873792
          i49 |  -2.365878   .2417067    -9.79   0.000    -2.839614   -1.892141
          i50 |  -3.445149   .3715704    -9.27   0.000    -4.173414   -2.716885
          i51 |   -2.09033   .4519418    -4.63   0.000     -2.97612    -1.20454
          i52 |  -1.271936   .9251062    -1.37   0.169    -3.085111    .5412387
          i53 |  -.8364189   .3515881    -2.38   0.017    -1.525519    -.147319
          i54 |  -1.282127   .9731205    -1.32   0.188    -3.189409    .6251538
          i55 |  -2.246951   .5490816    -4.09   0.000    -3.323132   -1.170771
          i56 |  -5.272509   .6961537    -7.57   0.000    -6.636945   -3.908073
          i57 |  -1.732542   .1674373   -10.35   0.000    -2.060713   -1.404371
          i58 |  -1.177375   .1449075    -8.13   0.000    -1.461389   -.8933617
          i59 |  -2.000364   .6643577    -3.01   0.003    -3.302481   -.6982467
          i60 |  -1.713119   .0931547   -18.39   0.000    -1.895699   -1.530539
          i61 |  -.5532763   .4472135    -1.24   0.216    -1.429799     .323246
          i62 |  -1.454811   .6218854    -2.34   0.019    -2.673684    -.235938
          i63 |  -2.869434   .3570727    -8.04   0.000    -3.569284   -2.169585
          i64 |  -.7702415   .8510669    -0.91   0.365    -2.438302     .897819
          i65 |  -2.158683   .5507937    -3.92   0.000    -3.238219   -1.079148
          i66 |  -2.263704   .5055894    -4.48   0.000    -3.254641   -1.272767
          i67 |  -3.425344   1.790264    -1.91   0.056    -6.934196    .0835088
          i68 |  -1.943415   .7098988    -2.74   0.006    -3.334791   -.5520389
          i69 |   -.678649   .4436167    -1.53   0.126    -1.548122    .1908238
          i70 |  -2.350908   .7644464    -3.08   0.002    -3.849195   -.8526204
          i71 |  -1.540743   1.129556    -1.36   0.173    -3.754632    .6731461
          i72 |  -2.297071   .7002207    -3.28   0.001    -3.669478   -.9246636
          i73 |  -1.959757   .7519808    -2.61   0.009    -3.433612   -.4859018
          i74 |  -.9758521   .4789797    -2.04   0.042    -1.914635   -.0370691
          i75 |  -2.532476   .1856169   -13.64   0.000    -2.896278   -2.168674
          i76 |  -1.665264   .1144638   -14.55   0.000    -1.889609   -1.440919
          i77 |  -2.125801   .1819268   -11.68   0.000    -2.482371   -1.769231
          i78 |  -3.748923   .7509274    -4.99   0.000    -5.220713   -2.277132
          i79 |  -1.692161   .9507829    -1.78   0.075    -3.555662    .1713389
          i80 |   .3057168   .6343389     0.48   0.630    -.9375645    1.548998
          i81 |  -2.863253   .3528662    -8.11   0.000    -3.554858   -2.171648
          i82 |  -1.253154   .4987881    -2.51   0.012    -2.230761   -.2755471
          i83 |  -2.718172   .7163795    -3.79   0.000     -4.12225   -1.314094
          i84 |  -5.476265   .9123018    -6.00   0.000    -7.264344   -3.688187
          i85 |  -2.696434   .0395565   -68.17   0.000    -2.773964   -2.618905
          i87 |  -1.057637   .4166845    -2.54   0.011    -1.874324   -.2409506
          i88 |  -.6221639   .5335772    -1.17   0.244    -1.667956    .4236282
        _cons |   5.064869   1.966344     2.58   0.010     1.210905    8.918832
--------------+----------------------------------------------------------------
var(e.infan~t)|   33.13863   9.134847                      19.30617    56.88176
  var(e.lrhom)|    .154178   .0340382                      .1000233    .2376532
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(rol->`iv2')
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel.xml
dir : seeout

. 
. //      #12
. //      Mediation models for  infnat=> rol 
. sem ( `iv2'-> rol, ) ( `iv2' rol -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv')
>   ,  vce(cluster CID) nocapslatent
(145 observations with missing values excluded)

Endogenous variables
  Observed: rol lrhom

Exogenous variables
  Observed: infantmort edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6
            i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23
            i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39
            i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55
            i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71
            i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:   log pseudolikelihood =  84988.668  
Iteration 1:   log pseudolikelihood =  84988.668  (backed up)

Structural equation model                                Number of obs = 1,379
Estimation method: ml

Log pseudolikelihood = 84988.668

                                   (Std. err. adjusted for 88 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
             | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
Structural   |
  rol        |
  infantmort |  -.0832713   .0123293    -6.75   0.000    -.1074362   -.0591064
       _cons |   1.341094   .1320655    10.15   0.000      1.08225    1.599938
  -----------+----------------------------------------------------------------
  lrhom      |
         rol |  -.4731735   .1594876    -2.97   0.003    -.7857634   -.1605836
  infantmort |   .0082058   .0144014     0.57   0.569    -.0200204    .0364321
         edu |  -3.233939   .8423094    -3.84   0.000    -4.884835   -1.583043
       unemp |   .0027268   .0068198     0.40   0.689    -.0106397    .0160933
    popdense |  -.0002294   .0001202    -1.91   0.056    -.0004649    6.22e-06
    perurban |   .0078258   .0249779     0.31   0.754      -.04113    .0567817
    sexratio |  -.0042898   .0083308    -0.51   0.607    -.0206178    .0120382
          i1 |  -2.098122   .8885122    -2.36   0.018    -3.839574   -.3566704
          i2 |  -1.570136   .4007875    -3.92   0.000    -2.355665   -.7846065
          i3 |  -1.224142   .1083755   -11.30   0.000    -1.436555    -1.01173
          i4 |  -2.154451   .5566871    -3.87   0.000    -3.245537   -1.063364
          i5 |    .543332   .1856395     2.93   0.003     .1794852    .9071789
          i6 |  -3.736979   .6127923    -6.10   0.000     -4.93803   -2.535929
          i7 |  -2.897869   .5178576    -5.60   0.000    -3.912851   -1.882886
          i8 |   -.012484   1.114951    -0.01   0.991    -2.197747    2.172779
          i9 |  -1.590664   .4085308    -3.89   0.000     -2.39137   -.7899587
         i10 |  -.2301302   .3502965    -0.66   0.511    -.9166988    .4564383
         i11 |   -.040218   .9073382    -0.04   0.965    -1.818568    1.738132
         i12 |  -3.389631   .2541115   -13.34   0.000     -3.88768   -2.891582
         i13 |  -2.419335   .3576024    -6.77   0.000    -3.120223   -1.718447
         i14 |  -1.400756   .0416619   -33.62   0.000    -1.482412   -1.319101
         i15 |  -1.446363   1.562181    -0.93   0.355    -4.508183    1.615456
         i16 |  -.9488622   .2151307    -4.41   0.000    -1.370511   -.5272138
         i17 |   .0019109   .3537393     0.01   0.996    -.6914054    .6952273
         i18 |  -.7403501   .3217996    -2.30   0.021    -1.371066   -.1096345
         i19 |  -2.409614     .71908    -3.35   0.001    -3.818985   -1.000243
         i20 |  -1.829754   .3988363    -4.59   0.000    -2.611458   -1.048049
         i21 |  -2.184696   .2492008    -8.77   0.000    -2.673121   -1.696271
         i22 |  -1.834426   .1475345   -12.43   0.000    -2.123588   -1.545264
         i23 |   -1.47226   .3911461    -3.76   0.000    -2.238892   -.7056274
         i24 |  -1.185495   .5908413    -2.01   0.045    -2.343522    -.027467
         i25 |   .0955873   .5135384     0.19   0.852    -.9109294    1.102104
         i26 |   -.373925   .3339064    -1.12   0.263     -1.02837    .2805196
         i27 |  -2.804799   .7758849    -3.61   0.000    -4.325505   -1.284092
         i28 |  -.9370587   .0948126    -9.88   0.000    -1.122888   -.7512294
         i29 |   -2.58925   .1362589   -19.00   0.000    -2.856313   -2.322188
         i30 |  -2.550782   .6586519    -3.87   0.000    -3.841716   -1.259848
         i31 |   -2.12628   .1218623   -17.45   0.000    -2.365126   -1.887434
         i32 |  -2.394098   .2663057    -8.99   0.000    -2.916047   -1.872148
         i33 |  -.9821849   .8114752    -1.21   0.226    -2.572647    .6082773
         i34 |  -.7393762   1.264494    -0.58   0.559    -3.217739    1.738987
         i35 |  -1.942712   .3513482    -5.53   0.000    -2.631342   -1.254083
         i36 |  -2.233263   .2887492    -7.73   0.000    -2.799201   -1.667325
         i37 |  -1.783762   .5045788    -3.54   0.000    -2.772718   -.7948057
         i38 |  -1.303983   .2842534    -4.59   0.000     -1.86111   -.7468568
         i39 |  -2.780607   .4051683    -6.86   0.000    -3.574723   -1.986492
         i40 |  -2.378731    .727915    -3.27   0.001    -3.805418   -.9520439
         i41 |  -3.094673   .2408551   -12.85   0.000     -3.56674   -2.622606
         i42 |   -.949716   .6823758    -1.39   0.164    -2.287148    .3877159
         i43 |  -2.781847   .3416645    -8.14   0.000    -3.451497   -2.112197
         i44 |   -1.78529   .1484408   -12.03   0.000    -2.076229   -1.494352
         i45 |    -3.2302   .6237195    -5.18   0.000    -4.452668   -2.007733
         i46 |  -1.947052   1.153019    -1.69   0.091    -4.206927     .312824
         i47 |  -.3146001   .3583694    -0.88   0.380    -1.016991    .3877909
         i48 |  -.4695587   .3861999    -1.22   0.224    -1.226497    .2873792
         i49 |  -2.365878   .2417067    -9.79   0.000    -2.839614   -1.892141
         i50 |  -3.445149   .3715704    -9.27   0.000    -4.173414   -2.716885
         i51 |   -2.09033   .4519418    -4.63   0.000     -2.97612    -1.20454
         i52 |  -1.271936   .9251062    -1.37   0.169    -3.085111    .5412387
         i53 |  -.8364189   .3515881    -2.38   0.017    -1.525519    -.147319
         i54 |  -1.282127   .9731205    -1.32   0.188    -3.189409    .6251538
         i55 |  -2.246951   .5490816    -4.09   0.000    -3.323132   -1.170771
         i56 |  -5.272509   .6961537    -7.57   0.000    -6.636945   -3.908073
         i57 |  -1.732542   .1674373   -10.35   0.000    -2.060713   -1.404371
         i58 |  -1.177375   .1449075    -8.13   0.000    -1.461389   -.8933617
         i59 |  -2.000364   .6643577    -3.01   0.003    -3.302481   -.6982467
         i60 |  -1.713119   .0931547   -18.39   0.000    -1.895699   -1.530539
         i61 |  -.5532763   .4472135    -1.24   0.216    -1.429799     .323246
         i62 |  -1.454811   .6218854    -2.34   0.019    -2.673684    -.235938
         i63 |  -2.869434   .3570727    -8.04   0.000    -3.569284   -2.169585
         i64 |  -.7702415   .8510669    -0.91   0.365    -2.438302     .897819
         i65 |  -2.158683   .5507937    -3.92   0.000    -3.238219   -1.079148
         i66 |  -2.263704   .5055894    -4.48   0.000    -3.254641   -1.272767
         i67 |  -3.425344   1.790264    -1.91   0.056    -6.934196    .0835088
         i68 |  -1.943415   .7098988    -2.74   0.006    -3.334791   -.5520389
         i69 |   -.678649   .4436167    -1.53   0.126    -1.548122    .1908238
         i70 |  -2.350908   .7644464    -3.08   0.002    -3.849195   -.8526204
         i71 |  -1.540743   1.129556    -1.36   0.173    -3.754632    .6731461
         i72 |  -2.297071   .7002207    -3.28   0.001    -3.669478   -.9246636
         i73 |  -1.959757   .7519808    -2.61   0.009    -3.433612   -.4859018
         i74 |  -.9758521   .4789797    -2.04   0.042    -1.914635   -.0370691
         i75 |  -2.532476   .1856169   -13.64   0.000    -2.896278   -2.168674
         i76 |  -1.665264   .1144638   -14.55   0.000    -1.889609   -1.440919
         i77 |  -2.125801   .1819268   -11.68   0.000    -2.482371   -1.769231
         i78 |  -3.748923   .7509274    -4.99   0.000    -5.220713   -2.277132
         i79 |  -1.692161   .9507829    -1.78   0.075    -3.555662    .1713389
         i80 |   .3057168   .6343389     0.48   0.630    -.9375645    1.548998
         i81 |  -2.863253   .3528662    -8.11   0.000    -3.554858   -2.171648
         i82 |  -1.253154   .4987881    -2.51   0.012    -2.230761   -.2755471
         i83 |  -2.718172   .7163795    -3.79   0.000     -4.12225   -1.314094
         i84 |  -5.476265   .9123018    -6.00   0.000    -7.264344   -3.688187
         i85 |  -2.696434   .0395565   -68.17   0.000    -2.773964   -2.618905
         i87 |  -1.057637   .4166845    -2.54   0.011    -1.874324   -.2409506
         i88 |  -.6221639   .5335772    -1.17   0.244    -1.667956    .4236282
       _cons |   5.064869   1.966344     2.58   0.010     1.210905    8.918832
-------------+----------------------------------------------------------------
   var(e.rol)|   .4580841    .065756                      .3457474    .6069202
 var(e.lrhom)|    .154178   .0340382                      .1000233    .2376532
------------------------------------------------------------------------------

. outreg2 using `file', append `opt'    addnote(`iv2'->rol)
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel.xml
dir : seeout

. 
. //      #13
. //      save and close 
. note:  Hertiage heritage -> infant unable to find maximum | `note'.

. note:  Mediation models | `note'. 

. notes

_dta:
  1.  Cleaned WHO homicide data for overall, age and gender | merged data
      together | |meg | 03-23-2023 | CT01-DataMerge-V02.
  2.  30JUN2022
  3.  Got data out of .csv into .dta, merged data, and generated variables | \
      06-28-2022 \ SP01-CleaningData.
  4.  Completed sample and pre-model diagnostics | | 07-05-23| Cleaned 06-06-24
      | MAR02-SampDiag.
  5.  Hertiage heritage -> infant unable to find maximum | | 07-05-23| Cleaned
      06-06-24 | MAR03-MedModel.
  6.  Mediation models | | 07-05-23| Cleaned 06-06-24 | MAR03-MedModel.

ryoung:
  1.  (pop1519*1000)+(pop2024*1000)/pop *100

rmyoung:
  1.  (mpop1519*1000)+(mpop2024*1000)+(mpop2529*1000)/popmale*100 | \ 06-28-2022
      \ SP01-CleaningData.

edu:
  1.  (eys_index+mys_index)/2 | \ 06-28-2022 \ SP01-CleaningData.

unemp:
  1.  Nation Estimates then missing filled with ILO estimates corr 1 or .9457 |
      \ 06-28-2022 \ SP01-CleaningData.

sexratio:
  1.  popmale/popfemale*100 | \ 06-28-2022 \ SP01-CleaningData.

eys_index:
  1.  (eys-0)/(18+0) | \ 06-28-2022 \ SP01-CleaningData

mys_index:
  1.  (mys-0)/(15+0) | \ 06-28-2022 \ SP01-CleaningData

lrhom:
  1.  | 07-05-23| Cleaned 06-06-24 | MAR02-SampDiag.

. save `file'.dta, replace 
file MAR03-MedModel.dta saved

. log close 
      name:  <unnamed>
       log:  R:\Current Research\Markets-Pridemore\Work\MAR03-MedModel.log
  log type:  text
 closed on:  25 Jun 2024, 15:23:49
--------------------------------------------------------------------------------
